import http from "../utils/http";
// 获取角色列表
let getRoles = ()=>http(`roles`);
// 删除角色指定权限
let removeTag = (roleId:number,rightId:number)=>http(`roles/${roleId}/rights/${rightId}`,"DELETE");
// 获取权限列表
let getRightsList = (type:'tree'|'list')=>http(`rights/${type}`);
//  角色授权
let setRigthsUser = (roleId:number,rids:string) =>http(`roles/${roleId}/rights`,'POST',{rids})
export {
    getRoles,
    removeTag,
    getRightsList,
    setRigthsUser
}